package view;

import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JTextField;
import javax.swing.JLabel;

import java.awt.Font;

import javax.swing.JButton;
import javax.swing.UIManager;
import javax.swing.JTextArea;
import javax.swing.JTextPane;
import javax.swing.JList;
import javax.swing.DropMode;
import java.awt.Color;
import javax.swing.JComboBox;

public class Add_Question extends JFrame {

	private JPanel contentPane;
	private JLabel lblA;
	private JLabel lblC;
	private JLabel lblB;
	private JLabel lblD;
	private JTextField textField;
	private JTextField textField_1;
	private JTextField textField_2;
	private JTextField textField_3;
	private JButton btnNewButton;
	private JButton btnExit;
	private JButton btnClear;
	private JLabel lblCorrectAnswer;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					Home frame = new Home();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 */
	public Add_Question() {
		// Frame
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(500, 20, 500, 700);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		contentPane.setLayout(null);
		setContentPane(contentPane);

		// JPanel Answers
		JPanel panel_Answers = new JPanel();
		panel_Answers.setBounds(10, 485, 464, 120);
		panel_Answers.setOpaque(false);
		panel_Answers.setLayout(null);
		contentPane.add(panel_Answers);

		lblA = new JLabel("A.");
		lblA.setForeground(UIManager.getColor("text"));
		lblA.setFont(new Font("Tahoma", Font.BOLD, 14));
		lblA.setBounds(10, 11, 23, 14);
		panel_Answers.add(lblA);

		lblC = new JLabel("C.");
		lblC.setForeground(UIManager.getColor("text"));
		lblC.setFont(new Font("Tahoma", Font.BOLD, 14));
		lblC.setBounds(10, 50, 23, 14);
		panel_Answers.add(lblC);

		lblB = new JLabel("B.");
		lblB.setForeground(UIManager.getColor("text"));
		lblB.setFont(new Font("Tahoma", Font.BOLD, 14));
		lblB.setBounds(237, 13, 23, 14);
		panel_Answers.add(lblB);

		lblD = new JLabel("D.");
		lblD.setForeground(UIManager.getColor("text"));
		lblD.setFont(new Font("Tahoma", Font.BOLD, 14));
		lblD.setBounds(237, 50, 23, 14);
		panel_Answers.add(lblD);

		textField = new JTextField();
		textField.setBounds(32, 10, 195, 20);
		panel_Answers.add(textField);
		textField.setColumns(10);

		textField_1 = new JTextField();
		textField_1.setColumns(10);
		textField_1.setBounds(32, 49, 195, 20);
		panel_Answers.add(textField_1);

		textField_2 = new JTextField();
		textField_2.setColumns(10);
		textField_2.setBounds(259, 10, 195, 20);
		panel_Answers.add(textField_2);

		textField_3 = new JTextField();
		textField_3.setColumns(10);
		textField_3.setBounds(259, 49, 195, 20);
		panel_Answers.add(textField_3);
		
		lblCorrectAnswer = new JLabel("CORRECT ANSWER:");
		lblCorrectAnswer.setForeground(Color.WHITE);
		lblCorrectAnswer.setFont(new Font("Tahoma", Font.BOLD, 14));
		lblCorrectAnswer.setBounds(56, 95, 151, 14);
		panel_Answers.add(lblCorrectAnswer);
		
		JComboBox comboBox = new JComboBox();
		comboBox.setBounds(199, 94, 151, 20);
		panel_Answers.add(comboBox);

		btnNewButton = new JButton("ADD");
		btnNewButton.setBounds(82, 616, 89, 23);
		contentPane.add(btnNewButton);

		btnExit = new JButton("EXIT");
		btnExit.setBounds(315, 616, 89, 23);
		contentPane.add(btnExit);

		btnClear = new JButton("CLEAR");
		btnClear.setBounds(199, 616, 89, 23);
		contentPane.add(btnClear);

		JTextArea textArea = new JTextArea();
		textArea.setLineWrap(true);
		textArea.setBounds(10, 401, 464, 73);
		contentPane.add(textArea);

		JLabel lblNewLabel = new JLabel("New label");
		lblNewLabel.setBounds(0, 0, 484, 661);
		lblNewLabel.setIcon(new ImageIcon("img/Rongvang.jpg"));
		contentPane.add(lblNewLabel);

	}
	
	private void ComboboxAddItem(JComboBox  comboBox)
	{
		comboBox.addItem("");
	}
}
